<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>管理后台</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.4 -->
    <link href="/public/static/admin/css/bootstrap.min.css" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="/public/static/admin/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/public/static/admin/css/animate.css" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/static/admin/css/style.css?v=4.0.0" rel="stylesheet">
    <link href="/public/static/admin/css/ratuo.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/public/webuploader/webuploader.css">
    <!-- jQuery 2.1.4 -->
    <script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/static/admin/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/public/static/admin/js/myFormValidate.js"></script>
    <script src="/public/static/admin/js/common.js"></script>
    <script src="/public/static/admin/js/myAjax.js"></script>
    <script src="/public/static/admin/js/article.js"></script> 
    <script src="/public/static/admin/js/plugins/layer/layer.min.js"></script>
    <script src="/public/static/admin/js/jquery.validate.js"></script>
    <!-- webuploader -->
     <script type="text/javascript" src="/public/webuploader/webuploader.nolog.js"></script>
     <script type="text/javascript" src="/public/static/admin/js/webupload.js"></script>
    <!-- iCheck -->
    <link href="/public/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <script src="/public/static/admin/js/plugins/iCheck/icheck.min.js"></script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Main content -->
    <div class="row">
      <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>产品分类</h5>
            </div>
            <div class="ibox-content">
                <form  method="post"  id="articleForm" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">父级栏目：</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="parent_id">
                            <option value="0">顶级分类</option>
                            <?php echo $cat_select ?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">分类名称：</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="kind_name" id="kind_name" value="{$one.kind_name}">
                        </div>
                            <label for="kind_name"></label>
                    </div>
                    <div class="form-group" style="display:none">
                        <label class="col-sm-2 control-label">英文名称：</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="e_kind_name" id="e_kind_name" value="{$one.e_kind_name}">
                        </div>
                            <label for="e_kind_name"></label>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">banner图片：</label>
                        <div class="col-sm-8">
                            <div class="input-group uploder-container">
                                <input type="text" class="form-control" name="banner_img" id="banner_img" value="{$one.banner_img}" placeholder="请选择分类图片"> 
                                <span class="input-group-btn"> <button type="button" class="btn btn-primary filePicker">选择图片</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">（手机端）banner图片：</label>
                        <div class="col-sm-8">
                            <div class="input-group uploder-container">
                                <input type="text" class="form-control" name="p_banner_img" id="p_banner_img" value="{$one.p_banner_img}" placeholder="请选择分类图片"> 
                                <span class="input-group-btn"> <button type="button" class="btn btn-primary filePicker">选择图片</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">网页标题：</label>
                        <div class="col-sm-8">
                            <input class="configInput form-control" name="web_title" minlength="2" type="text" value="{$one.web_title}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">网页关键词：</label>
                        <div class="col-sm-8">
                            <input class="configInput form-control" name="keywords" type="text" class="configInput" value="{$one.keywords}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">网页描述：</label>
                        <div class="col-sm-8">
                            <input class="configInput form-control" name="description" type="text" class="configInput" value="{$one.description}">
                        </div>
                    </div>
                     <div class="form-group">
                        <label class="col-sm-2 control-label">列表产品数：</label>
                        <div class="col-sm-8">
                            <input class="configInput form-control" name="art_num" minlength="1" type="number" value="{$one.art_num}">
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序：</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="sort_order" name="sort_order" value="{$one.sort_order|default='50'}">
                        </div>
                            <label for="sort_order"></label>
                    </div>

                    <div class="hr-line-dashed"></div>
                    <input type="hidden" name="kind_id" value="{$one.kind_id}">
                    <input type="hidden" name="act" value="{$act}">
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button class="btn btn-primary" type="button" onclick="ajax_submit_form('articleForm','{:url('Product/kind_form')}')">保存</button>
                        </div>
                    </div> 
                </form>
            </div>
        </div>
 	  </div> 
    </div>    <!-- /.content -->
   </section>
</div>
<script>
    $(function() {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        $("#articleForm").validate({
            rules: {
                title: { required: true},
            },
            messages: {
                title:{
                    required:"名称不能为空"
                },

            },
        });
    });
</script>

</body>
</html>